package com.czy.basecommon.utils.base;
/**
 * @author Jake Han
 */
public abstract class BaseThread extends Thread{

    private String url;
    private String json;

    public BaseThread(String url, String json) {
        this.url = url;
        this.json = json;
    }

    @Override
    public void run() {
        super.run();
        if (url.trim().toLowerCase().startsWith("http")){
            runHttpRequest();
        }else if (url.trim().toLowerCase().startsWith("https")){
            runHttpsRequest();
        }
    }

    protected abstract void runHttpsRequest();
    protected abstract void runHttpRequest();
}
